<!--  -->
<template>
  <div class="detail-swiper">
    <swiper ref="mySwiper" :options="swiperOptions">
      <swiper-slide
        class="swiper-item"
        v-for="(item, index) in topImages"
        :key="index"
      >
        <img :src="item" alt="" />
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      swiperOptions: {
        pagination: {
          el: ".swiper-pagination",
        },
        autoplay: true,
        effect:'coverflow'
      },
    };
  },
  props: {
    topImages: {
      type: Array,
      default() {
        return [];
      },
    },
  },
};
</script>

<style scoped>
.swiper-item {
  height: 300px;
}
.swiper-item img {
  width: 100%;
}
</style>